﻿using Xc.DataAccess.DataBases.Core.Models;
using Xc.DataAccess.Protocoals.WaterMeters.Models;
using Xc.DataAccess.Protocoals.WaterMeters.Models.Responds;

namespace Xc.WaterMeters.ClientHost.Models
{
    public class MeterInfo: IntDbTable
    {
        /// <summary>
        /// 设备地址
        /// </summary>
        public string MeterAddress { get; set; }
        /// <summary>
        /// 通讯次数
        /// </summary>
        public ulong CommunicationCount { get; set; }
        /// <summary>
        /// 累积流量
        /// </summary>
        public decimal CumulativeFlow { get;  set; }
        /// <summary>
        /// 单位
        /// </summary>
        public MeterUnit CumulativeFlowUnit { get;  set; }
        /// <summary>
        /// 剩余流量
        /// </summary>
        public decimal RemainFlow { get;  set; }
        /// <summary>
        /// 单位
        /// </summary>
        public MeterUnit RemainFlowUnit { get;  set; }
        /// <summary>
        /// 实时时间
        /// </summary>
        public string DateTime { get;  set; }
        /// <summary>
        /// 表具状态
        /// </summary>

        public MeterStatus MeterStatus { get;  set; }
        /// <summary>
        /// ICCID码
        /// </summary>
        public string ICCID { get;  set; }
        /// <summary>
        /// IP地址
        /// </summary>
        public string Ip { get;  set; }
        /// <summary>
        /// 端口
        /// </summary>
        public int Port { get;  set; }
        /// <summary>
        /// 信号质量
        /// </summary>
        public byte RSSI_1 { get;  set; }
        /// <summary>
        /// 误码率
        /// </summary>
        public byte RSSI_2 { get;  set; }
        /// <summary>
        /// 随机数
        /// </summary>
        public byte Random { get;  set; }
        /// <summary>
        /// 区域代码
        /// </summary>
        public ushort AreaCode { get;  set; }
        /// <summary>
        /// 卡片行为
        /// </summary>
        public CardBehavior CardBehavior { get;  set; }
        /// <summary>
        /// 充值次数
        /// </summary>
        public ushort ChargeCount { get;  set; }
        /// <summary>
        /// 本次购买量
        /// </summary>
        public decimal BuyAmount { get;  set; }
        /// <summary>
        /// 本次购买量单位
        /// </summary>
        public MeterUnit BuyAmountUnit { get;  set; }

        /// <summary>
        /// 囤积量
        /// </summary>
        public decimal StockFlow { get;  set; }
        /// <summary>
        /// 报警量
        /// </summary>
        public byte AlarmFlow { get;  set; }
    }

}
